package classesinternas;

public class Ex37 {
	
	public static void main(String[] args) {
		Externa e = new Externa();
		e.pirar();
		e.hehe();
	}

}

class Externa{
	
	private int x = 10;
	private Object y;
	
	public void pirar()
	{
		final String xx = "pirari";
		
		class Loka
		{
			
			public void impressionar()
			{
				
				System.out.println(Externa.this.x);
				System.out.println(xx);
				y = this;
//				System.out.println(Externa.this.x); //OK!!!
				
			}//method impressionar
			
			@Override
			public String toString() {
				// TODO Auto-generated method stub
				return "uhuhauhauahau";
			}
			
		}//class Loka
		
		Loka l = new Loka();
		l.impressionar();;
		
	}//pirar
	
	public void hehe()
	{
		class Loka
		{
			
			public void impressionar()
			{
				
			}//method impressionar
			
			@Override
			public String toString() {
				// TODO Auto-generated method stub
				return "uhuhauhauahau";
			}
			
		}//class Loka
		Loka l = (Loka) y;
		System.out.println(y);
	}
	
}
